package com.smtx.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 * User: repnikov
 * Date: 08.04.11
 * Time: 0:25
 * To change this template use File | Settings | File Templates.
 */
public interface ServiceManager {
    void register(String name, Service service);

    void register(Map<String, Service> services);

    Service unregister(String name);

    Set<Service> unregister(Collection<String> names);

    Service getService(String name) throws ServiceManagerException;

    <X extends Service> X getService(String name, Class<X> clazz) throws ServiceManagerException;

    List<Service> listServices(ServiceType type);

    List<Service> listServices();
}
